<?php

namespace app\shop\validate;

class OrderRefundValidate extends BaseValidate
{
    protected $rule = [
        'id'                  => 'require',
        // 'delivery_company_code' => 'require',
        'delivery_company_id' => 'require',
        'delivery_no'         => 'require',
        'refund_type'         => 'require',
        'refund_num'          => 'require'
    ];

    protected $message = [
        'id.require'                  => 'ID不能为空',
        // 'delivery_company_code.require' => '物流公司编码不能为空',
        'delivery_company_id.require' => '物流公司ID不能为空',
        'delivery_no.require'         => '物流单号不能为空',
        'refund_type.require'         => '退款类型不能为空',
        'refund_num.require'          => '申请数量不能为空'
    ];

    protected $scene = [
        'list'          => [''],
        'detail'        => ['id'],
        'refund'        => ['id', 'refund_type', 'refund_num'],
        'refund_list'   => [''],
        'refund_return' => ['id', 'delivery_company_code', 'delivery_no']
    ];
}